package com.cskaoyan.controller.admin;

import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.param.CommonData;
import com.cskaoyan.bean.vo.region.AdminRegionVO;
import com.cskaoyan.service.admin.AdminRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author :rain
 * @description
 * @since 2022/06/26 16:18
 */
@RestController
@RequestMapping("admin/region")
public class AdminRegionController {

    @Autowired
    AdminRegionService adminRegionService;

    /**
     * (行政区域信息)显示省份的信息
     *
     * @return
     */
    @RequestMapping("list")
    public BaseRespVo list() {
     CommonData<AdminRegionVO> regionCommonData = adminRegionService.qureyRegionInfo();
        BaseRespVo baseRespVo = new BaseRespVo();
        baseRespVo.setErrno(0);
        baseRespVo.setData(regionCommonData);
        baseRespVo.setErrmsg("成功");
        return baseRespVo;
    }
}
